import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { Language } from "../../../../../extend/language/Language";
import { DailySpecialInfo } from "../../../model/DailySpecialInfo";
import { HTMLUtil } from "../../../../../com/gengine/utils/HTMLUtil";
//class SpecialActiveTitle
    
    export  class SpecialActiveTitle /* flash.display.Sprite */
    {
        constructor()
        {
            
            this.initUI();
            return;
        }

        protected initUI(): void
        {
            this._timeTitle = new Object /* flash.text.TextField */();
            this._timeTitle.autoSize = flash.text.TextFieldAutoSize.LEFT;
            this._timeTitle.textColor = GlobalStyle.color2Uint;
            this._timeTitle.width = 80;
            this._timeTitle.height = 18;
            this._timeTitle.mouseEnabled = false;
            this._timeTitle.text = Language.getString(20947) + "：";
            addChild(this._timeTitle);
            this._timeTxt = new Object /* flash.text.TextField */();
            this._timeTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
            this._timeTxt.textColor = GlobalStyle.color1Uint;
            this._timeTxt.width = 300;
            this._timeTxt.height = 18;
            this._timeTxt.mouseEnabled = false;
            this._timeTxt.x = 70;
            addChild(this._timeTxt);
            this._getTitle = new Object /* flash.text.TextField */();
            this._getTitle.autoSize = flash.text.TextFieldAutoSize.LEFT;
            this._getTitle.textColor = GlobalStyle.color2Uint;
            this._getTitle.width = 80;
            this._getTitle.height = 18;
            this._getTitle.mouseEnabled = false;
            this._getTitle.text = Language.getString(20952) + "：";
            this._getTitle.y = 20;
            addChild(this._getTitle);
            this._getTxt = new Object /* flash.text.TextField */();
            this._getTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
            this._getTxt.textColor = GlobalStyle.color1Uint;
            this._getTxt.width = 400;
            this._getTxt.height = 18;
            this._getTxt.mouseEnabled = false;
            this._getTxt.y = this._getTitle.y;
            this._getTxt.x = this._timeTxt.x;
            addChild(this._getTxt);
            this._desTitle = new Object /* flash.text.TextField */();
            this._desTitle.autoSize = flash.text.TextFieldAutoSize.LEFT;
            this._desTitle.textColor = GlobalStyle.color2Uint;
            this._desTitle.width = 70;
            this._desTitle.height = 18;
            this._desTitle.mouseEnabled = false;
            this._desTitle.y = 40;
            this._desTitle.text = Language.getString(20953) + "：";
            addChild(this._desTitle);
            this._desTxt = new Object /* flash.text.TextField */();
            this._desTxt.autoSize = flash.text.TextFieldAutoSize.LEFT;
            this._desTxt.textColor = GlobalStyle.color1Uint;
            this._desTxt.width = 410;
            this._desTxt.wordWrap = true;
            this._desTxt.multiline = true;
            this._desTxt.mouseEnabled = false;
            this._desTxt.x = this._getTxt.x;
            this._desTxt.y = this._desTitle.y;
            addChild(this._desTxt);
            return;
        }

        public updateData(arg1: DailySpecialInfo): void
        {
            this._timeTxt.text = arg1.activeTime;
            this._getTxt.htmlText = HTMLUtil.addColor(arg1.getRewardTime, GlobalStyle.color1);
            if (arg1.hadGetReward) 
            {
                this._getTxt.htmlText = this._getTxt.htmlText + HTMLUtil.addColor("(" + Language.getString(20954) + ")", "#ff0000");
            }
            this._desTxt.htmlText = HTMLUtil.addColor(arg1.context, GlobalStyle.color1);
            return;
        }

        public dispose(): void
        {
            this._timeTxt.text = "";
            this._getTxt.text = "";
            this._desTxt.text = "";
            return;
        }

        /* internal */ /* var */_timeTitle: Object /* flash.text.TextField */;

        /* internal */ /* var */_timeTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_getTitle: Object /* flash.text.TextField */;

        /* internal */ /* var */_getTxt: Object /* flash.text.TextField */;

        /* internal */ /* var */_desTitle: Object /* flash.text.TextField */;

        /* internal */ /* var */_desTxt: Object /* flash.text.TextField */;
    }
